home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
007
/
qbtools1.arc
/
AEDIALO1.BAS
< prev
next >
Wrap
BASIC Source File
|
1987-12-10
|
2KB
|
57 lines
rem $linesize:132
rem $title:'Application Engineer Standard Routines'
rem $subtitle:'Single Question Dialog box'
' Include the COMMON values
rem $include:'AESHARED.BAS'
sub Dialog(st1$,ls1%) static
locate ,,0
ae.sstack%=ae.sstack%+1000% ' Screen save stack
if ae.sstack%>10000% then
call ae.error("AEDT Screen Stack Overflow"+str$(ae.sstack%))
end if
attr%=( ae.bg%(2%) and 7%)*16% + ae.fg%(2%)
d%=ls1%
for j%=1% to 2%
k%=len(dialog$(j%))
if k%>d% then d%=k%
next j%
w%=d%+6%
l.marg%=(80%-w%)/2%
t.marg%=9%
r.marg%=l.marg%+w%-1%
b.marg%=16%
t.frame$=chr$(214%)+string$((w%-2%),196%)+chr$(183%)
b.frame$=chr$(211%)+string$((w%-2%),196%)+chr$(189%)
horz$=chr$(186%)+string$((w%-2%),32%)+chr$(186%)
call getscreen(ae.screens%(ae.sstack%-999%),t.marg%,l.marg%,b.marg%,r.marg%,0%,0%)
call xqprint(t.frame$,t.marg%,l.marg%,attr%,0%)
call xqprint(b.frame$,b.marg%,l.marg%,attr%,0%)
for j%=t.marg%+1% to b.marg%-1%
call xqprint(horz$,j%,l.marg%,attr%,0%)
next j%
l.marg%=l.marg%+4%
call xqprint(dialog$(1),t.marg%+2%,l.marg%,attr%,0%)
call xqprint(dialog$(2),t.marg%+3%,l.marg%,attr%,0%)
ipy1%=t.marg%+5%
call I.Block.Frame(ipy1%,l.marg%,1%,ls1%,1%)
call Input.Block(ipy1%,l.marg%,1%,ls1%,st1$,0%)
call putscreen(ae.screens%(ae.sstack%-999%),t.marg%,l.marg%-4%,b.marg%,r.marg%,0%,0%)
locate ,,0
ae.sstack%=ae.sstack%-1000%
end sub